﻿package fullHistory.exchangeddata 
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import keno.events.KenoEvent;
	import keno.GlobalVariables;
	/**
	 * ...
	 * @author Nguyen Thi Bich Phuong (Daisy)	 
	 * @author Doan Nguyen Thuy Nha Truc (Bamboo)	
	 */
	public class UserInfo extends EventDispatcher {		
		private var sessionId:String;
		private var userName:String;
		private var balance:Number;
		
		public function UserInfo(){}
		
		public function setSessionId(_sessionId:String):void {
			this.sessionId = _sessionId;
		}
		
		public function getSessionId():String {
			return this.sessionId;
		}
		
		public function setUserName(_userName:String):void {
			GlobalVariables.userName = _userName;
			this.userName = _userName;
		}
		
		public function getUserName():String {
			return this.userName;
		}
				
		public function setBalance(_balance:Number):void {
			GlobalVariables.balance = _balance;
			this.balance = _balance;
		}
		
		public function getBalance():Number {
			return this.balance;
			}		
		
		/**
		 * @author Daisy
		 * @param	result
		 */
		public function resultSetSessionToken(result:String):void {		
			var temp:Array = result.split("@");
			setSessionId(temp[0]);			
			trace("this.sessionId:" + this.sessionId);
		}
		
	}
}